<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><s:text name="context.title"/></title>
<%@ include file="/common/meta.jsp"%>
  <link rel="stylesheet" href="${ctx}/js/cluetip/jquery.cluetip.css" type="text/css" />

<script src="${ctx}/js/cluetip/jquery.cluetip.min.js" type="text/javascript"></script>
<script type="text/javascript" language="javascript">

          var pageTotalPages = "1";
          var pageNo = "";
        $(document).ready(function() {
        	
        	  $('.cluetip-link').cluetip({sticky: true,width:500, closePosition: 'title', arrows: true,ajaxCache:false});
        	var pageTotalPages = $("#pageTotalPages").val();
            var pageNo = $("#pageNo").val();
            $("#pager").pager({ pagenumber: pageNo, pagecount: pageTotalPages, buttonClickCallback: PageClick });

            var cache = {},
    		lastXhr;
	    	var cache1 = {},
	    	lastXhr1;
	    	$( ".collge" ).autocomplete({
	    		minLength: 0,
	    		source: function( request, response ) {
	    			var term = request.term;
	    			if ( term in cache ) {
	    				response( cache[ term ] );
	    				return;
	    			}
	    			lastXhr = $.post( "${ctx}/auto-complate-college.action?d=" + new Date(), {filter_LIKES_collegeName:term}, function( data, status, xhr ) {
	    			//	cache[ term ] = data;
	    				if ( xhr === lastXhr ) {
	    					response( data );
	    				}
	    			},"json");
	    		},
	    		select:function(e,ui){
	    			_getZhuanye(ui.item.value);
	    			}
	    	});
        });

        PageClick = function(pageclickednumber) {
            $("#pager").pager({ pagenumber: pageclickednumber, pagecount: pageTotalPages, buttonClickCallback: PageClick });
           // $("#result").html("Clicked Page " + pageclickednumber);
            jumpPage(pageclickednumber);
        }

    	var v = [];

    	function _getZhuanye(collge){
			$.post("exp!ajaxZhuanye?d=" + new Date(),{collge:collge},function(data){
				if(data != ""){
					cleanZhuanye();
					$(data).each(function(inx,o){
						$("#zhuanye").append("<option value='"+o.name+"'>"+o.name+"</option>");
						});
				}
				},"json");
    	}
    	function cleanZhuanye(){
			var obj = $("#zhuanye");
			obj.empty();
			obj.append("<option value=''>请选择专业</option>");
    	}

    	function cksct(obj){
			if(obj.checked){
				$(".ckbx").attr("checked","checked");
			}else{
				$(".ckbx").removeAttr("checked");
			}	
    	}
    </script>
</head>
<body>
<form action="exp" method="post" id="mainForm">
<input type="hidden" name="page.pageNo" id="pageNo" value="${page.pageNo}"/>
<input type="hidden" name="page.orderBy" id="orderBy" value="${page.orderBy}"/>
<input type="hidden" name="page.order" id="order" value="${page.order}"/>
<input type="hidden" id="pageTotalPages"  value="${page.totalPages}"/>
<br/>
<p align="center"><s:actionmessage theme="mytheme" cssClass="actionMessage"/></p>
<h1 class="title01"><img src="${ctx}/images/02_15.gif" width="45" height="42" class="fl"/>导出</h1>
<fieldset class="fs_ys" style="width: 800px">
<legend>查询</legend>
<table align="center" id="contentTable" class="table_ys_input" >
	<tr>
		<td nowrap>学院</td>
		<td>
			<input name="collge" class="collge" value="${collge }"/>
		</td>
		<td nowrap>专业</td>
		<td>
			<select name="zhuanye" id="zhuanye">
				<option value="">请选择专业</option>
			</select>
		</td>
	
		<td nowrap>教师姓名&nbsp;</td>
		<td><input type="text" name="teacherName" value="${teacherName}"/></td>
		<td nowrap>题目名称&nbsp;</td>
		<td colspan="">
			<input type="text" name="titile" value="${titile}"/>
		&nbsp;</td>
        <td><center><input type="submit"  value="  查询  "/></center></td>
	</tr>
</table>
		
</fieldset>
<s:if test="page.totalCount != 0">
<br/>
<br/>
<div>
	<input type="checkbox" name="flag" value="1"/>立题论证书 
	<input type="checkbox" name="flag" value="2"/>任务书  
	<input type="checkbox" name="flag" value="3"/>开题情况表  
	<input type="checkbox" name="flag" value="4"/>开题报告  
<!-- 	<input type="checkbox" name="flag" value="5"/>周记 -->
	<input type="checkbox" name="flag" value="6"/>3~4周记  
	<input type="checkbox" name="flag" value="7"/>5~6周记
	<input type="checkbox" name="flag" value="8"/>7~8周记
	<input type="checkbox" name="flag" value="9"/>9~10周记
	<input type="checkbox" name="flag" value="10"/>11~12周记
	<input type="checkbox" name="flag" value="12"/>13~14周记
	<input type="checkbox" name="flag" value="13"/>15~16周记
	<input type="checkbox" name="flag" value="14"/>周记总结
	

</div>
<div><input type="submit" value="导出" name="method:exp"/>  <input type="submit" value="  导出蓝皮书" name="method:expBlue"/></div>
<table id="contentTable" class="table_ys tableColor">
	<tr>
		<th nowrap="nowrap" colspan="">序号</th>
		<th nowrap="nowrap"><input type="checkbox" onclick="cksct(this)"/></th>
		<th nowrap="nowrap"><a href="javascript:sort('titile','asc')">题目</a></th>
		<th nowrap="nowrap"><a href="javascript:sort('teacherName','asc')">教师名称</a></th>
		<th nowrap="nowrap">教师职称</th>
		<th nowrap="nowrap">学生姓名</th>
		<th nowrap="nowrap">学号</th>
		<th nowrap="nowrap">操作</th>
	</tr>
	<s:iterator value="page.result" var="v" status="st">
	<tr>
		<td>${st.index + 1 }&nbsp;</td>
		<td><input type="checkbox" name="ids" class="ckbx" value="${id }"/></td>
		<td><a class="ui-state-default ui-corner-al" style="padding:3px 10px;text-decoration:none;" href="${ctx}/dabian/end-scoree!input?id=${v.id }">${v.titile }</a>&nbsp;</td>
		<td>${teacher_Name }&nbsp;</td>
		<td>${v.teacher_Post }&nbsp;</td>
		<td>${student_Name }&nbsp;</td>
		<td>${student_No }&nbsp;</td>
		<td>
			<tc:timeControler authName="答 辩">
			<a class="ui-state-default ui-corner-al" style="padding:3px 10px;text-decoration:none;" href="${ctx}/dabian/end-scoree!score?id=${v.id }">论文成绩评定表</a>
		</tc:timeControler>
		&nbsp;</td>
	</tr>
	</s:iterator>
</table>
<div align="center" id="pager" ></div>
</s:if>
</form>
</body>

</html>